package cn.powerone.scm.domain;

import cn.powerone.common.annotation.Excel;
import cn.powerone.common.core.domain.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.Setter;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 供应商报价单对象 scm_supplier_quotes
 * 
 * @author PowerOne
 * @date 2025-07-03
 */
@Setter
@Getter
public class ScmSupplierQuotesTemplate
{
    public ScmSupplierQuotesTemplate(ScmSupplierQuotes scmSupplierQuotes){
        copyFrom(scmSupplierQuotes);
    }
    public ScmSupplierQuotesTemplate() {
    }
    /** 数据库编号 */
    @Excel(name = "ID")
    private Long id;

    /** 供应商名称 */
    @Excel(name = "供应商简写")
    private String supplierName;

    @Excel(name = "图号")
    private String drawingNumber;

    /**
     * 版本
     */
    @Excel(name = "版本")
    private String version;

    /**
     * 内部版本号
     */
    @Excel(name = "内版本")
    private Long internalVersion;

    /** 品名 */
    @Excel(name = "品名")
    private String productName;

    /** 报价单编号 */
    @Excel(name = "报价单编号")
    private String quoteCode;


    /** 询价日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "询价日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date inquiryDate;

    /** 报价日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "报价日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date quoteDate;

    /** 材质 */
    @Excel(name = "材质")
    private String material;

    /** 阻燃等级 */
    @Excel(name = "阻燃等级")
    private String inflamingRetardingLevel;

    /** 是否含税 */
    @Excel(name = "是否含税")
    private String taxIncluded;

    /** 是否含运费 */
    @Excel(name = "是否含运费")
    private String freightIncluded;

    /** 一次性数量 */
    @Excel(name = "一次性数量")
    private BigDecimal disposableQuantity;

    /** 一次性单位 */
    @Excel(name = "一次性单位")
    private String disposableUnit;

    /** 一次性单位单价 */
    @Excel(name = "一次性单位单价")
    private BigDecimal disposableUnitPrice;

    /** 试做数量 */
    @Excel(name = "试做数量")
    private BigDecimal tryLot;

    /** 试做单位 */
    @Excel(name = "试做单位")
    private String tryUnit;

    /** 试做单位单价 */
    @Excel(name = "试做单位单价")
    private BigDecimal tryUnitPrice;

    /** 试做总价 */
    @Excel(name = "试做总价")
    private BigDecimal tryTotalPrice;

    /** 量产数量 */
    @Excel(name = "量产数量")
    private BigDecimal massLot;

    /** 量产单位 */
    @Excel(name = "量产单位")
    private String massUnit;

    /** 量产单位单价 */
    @Excel(name = "量产单位单价")
    private BigDecimal massUnitPrice;

    /** 模具费 */
    @Excel(name = "模具费")
    private BigDecimal moldCost;

    /** 工装费 */
    @Excel(name = "工装费")
    private BigDecimal jigCost;

    /** 模具试做天数 */
    @Excel(name = "模具试做天数")
    private Long moldTryingDeliveryDays;

    /** 模具使用寿命(次) */
    @Excel(name = "模具使用寿命(次)")
    private Long moldLife;

    /** 一次性交付天数 */
    @Excel(name = "一次性交付天数")
    private Long disposableDeliveryDays;

    /** 试做交付天数 */
    @Excel(name = "试做交付天数")
    private Long tryDeliveryDays;

    /** 量产交付天数 */
    @Excel(name = "量产交付天数")
    private Long massDeliveryDays;

    /** 供应商币种 */
    @Excel(name = "供应商币种")
    private String supplierCurrency;

    /** 供应商币种汇率 */
    @Excel(name = "供应商币种汇率")
    private BigDecimal supplierCurrencyRate;

    /** 备注 */
    @Excel(name = "备注")
    private String remarks;

    public void copyFrom(ScmSupplierQuotes scmSupplierQuotes){
        this.setId(scmSupplierQuotes.getId());
        this.setSupplierName(scmSupplierQuotes.getSupplierName());
        this.setDrawingNumber(scmSupplierQuotes.getDrawingNumber());
        this.setVersion(scmSupplierQuotes.getScmProjectProducts().getVersion());
        this.setInternalVersion(scmSupplierQuotes.getScmProjectProducts().getInternalVersion());
        this.setProductName(scmSupplierQuotes.getScmProjectProducts().getProductName());
        this.setQuoteCode(scmSupplierQuotes.getQuoteCode());
        this.setInquiryDate(scmSupplierQuotes.getInquiryDate());
        this.setQuoteDate(scmSupplierQuotes.getQuoteDate());
        this.setMaterial(scmSupplierQuotes.getScmProjectProducts().getMaterial());
        this.setInflamingRetardingLevel(scmSupplierQuotes.getScmProjectProducts().getInflamingRetardingLevel());
        this.setTaxIncluded(scmSupplierQuotes.getTaxIncluded());
        this.setFreightIncluded(scmSupplierQuotes.getFreightIncluded());
        this.setDisposableQuantity(scmSupplierQuotes.getDisposableQuantity());
        this.setDisposableUnit(scmSupplierQuotes.getDisposableUnit());
        this.setDisposableUnitPrice(scmSupplierQuotes.getDisposableUnitPrice());
        this.setTryLot(scmSupplierQuotes.getTryLot());
        this.setTryUnit(scmSupplierQuotes.getTryUnit());
        this.setTryUnitPrice(scmSupplierQuotes.getTryUnitPrice());
        this.setTryTotalPrice(scmSupplierQuotes.getTryTotalPrice());
        this.setMassLot(scmSupplierQuotes.getMassLot());
        this.setMassUnit(scmSupplierQuotes.getMassUnit());
        this.setMassUnitPrice(scmSupplierQuotes.getMassUnitPrice());
        this.setMoldCost(scmSupplierQuotes.getMoldCost());
        this.setJigCost(scmSupplierQuotes.getJigCost());
        this.setMoldTryingDeliveryDays(scmSupplierQuotes.getMoldTryingDeliveryDays());
        this.setMoldLife(scmSupplierQuotes.getMoldLife());
        this.setDisposableDeliveryDays(scmSupplierQuotes.getDisposableDeliveryDays());
        this.setTryDeliveryDays(scmSupplierQuotes.getTryDeliveryDays());
        this.setMassDeliveryDays(scmSupplierQuotes.getMassDeliveryDays());
        this.setSupplierCurrency(scmSupplierQuotes.getSupplierCurrency());
        this.setSupplierCurrencyRate(scmSupplierQuotes.getSupplierCurrencyRate());
        this.setRemarks(scmSupplierQuotes.getRemarks());
    }

    public ScmSupplierQuotes copyTo(ScmSupplierQuotes scmSupplierQuotes)
    {
        scmSupplierQuotes.setId(this.getId());
        scmSupplierQuotes.setQuoteCode( this.getQuoteCode());
        scmSupplierQuotes.setInquiryDate(this.getInquiryDate());
        scmSupplierQuotes.setQuoteDate(this.getQuoteDate());
        scmSupplierQuotes.setTaxIncluded(this.getTaxIncluded());
        scmSupplierQuotes.setFreightIncluded(this.getFreightIncluded());
        scmSupplierQuotes.setDisposableQuantity(this.getDisposableQuantity());
        scmSupplierQuotes.setDisposableUnit(this.getDisposableUnit());
        scmSupplierQuotes.setDisposableUnitPrice(this.getDisposableUnitPrice());
        scmSupplierQuotes.setTryLot(this.getTryLot());
        scmSupplierQuotes.setTryUnit(this.getTryUnit());
        scmSupplierQuotes.setTryUnitPrice(this.getTryUnitPrice());
        scmSupplierQuotes.setTryTotalPrice(this.getTryTotalPrice());
        scmSupplierQuotes.setMassLot(this.getMassLot());
        scmSupplierQuotes.setMassUnit(this.getMassUnit());
        scmSupplierQuotes.setMassUnitPrice(this.getMassUnitPrice());
        scmSupplierQuotes.setMoldCost(this.getMoldCost());
        scmSupplierQuotes.setJigCost(this.getJigCost());
        scmSupplierQuotes.setMoldTryingDeliveryDays(this.getMoldTryingDeliveryDays());
        scmSupplierQuotes.setMoldLife(this.getMoldLife());
        scmSupplierQuotes.setDisposableDeliveryDays(this.getDisposableDeliveryDays());
        scmSupplierQuotes.setTryDeliveryDays(this.getTryDeliveryDays());
        scmSupplierQuotes.setMassDeliveryDays(this.getMassDeliveryDays());
        scmSupplierQuotes.setSupplierCurrency(this.getSupplierCurrency());
        scmSupplierQuotes.setSupplierCurrencyRate(this.getSupplierCurrencyRate());
        scmSupplierQuotes.setRemarks(this.getRemarks());
        return scmSupplierQuotes;
    }
}